<table>
<% for cart_item in @cart.items %>
  <tr>
    <td><%= cart_item.quantity %>&times;<%= h(cart_item.title) %> <%= cart_item.price%></td>
    <td><%=button_to "删除",:action=>"delete_from_cart",:id=>cart_item.product_id%></td>
  </tr>
<% end %>
<tr>
  <td>总额:</td>
  <td><%= @cart.total_price%></td>
</tr>
</table>